﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace SGCG
{
    public partial class NumberOfSidesAskWindow : ChildWindow
    {

        public int NumberOfSides { get; private set; }

        private string numberOfSidesString;
        public string NumberOfSidesString 
        { 
            get { return numberOfSidesString; }
            set
            {
                UserMessage.Debug("setting to " + value);
                numberOfSidesString = value;
                int x = 0;
                int.TryParse(value, out x);
                UserMessage.Debug("setting to (int) " + x);
                NumberOfSides = x;
            }
        }

        public NumberOfSidesAskWindow()
        {
            InitializeComponent();
            DataContext = this;
        }

        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;
        }

    }
}

